<!--客户信息详情页-->
<template>
  <div id="CustomerDetailedInfo">
    <div class="breadcrumbs" style="margin: 0px;padding-top: 20px;">
      <ul>
        <li class="home"><a href="index.html" title="Go to Home Page"><strong style="font-size: 18px;">客户管理</strong></a>
          <span>/</span>
        </li>
        <li><strong>客户信息管理</strong><span>/</span></li>
        <li><strong>客户信息详情</strong></li>
      </ul>
    </div>
    <article class="col-main">
      <div class="my-account block block-account" style="padding-left: 20px;">

        <div class="page-title" style="border-bottom: #F1F3F6 1px solid;">
          <h2>客户信息详情</h2>
          <hr>
          <div style="margin-right: 10px">
            <button v-on:click="toCustomerContactsList" class="btn btn-success">联系人</button>
            <button v-on:click="toCustomerOrderList" class="btn btn-primary">订单</button>
            <button v-on:click="toCustomerCommunicationRecordList" class="btn btn-default">交往记录</button>
          </div>
        </div>

        <div style="margin: 0px 20px 40px 20px">
          <el-radio-group v-model="size">
            <el-radio label="">默认</el-radio>
            <el-radio label="medium">中等</el-radio>
            <el-radio label="small">小型</el-radio>
            <el-radio label="mini">超小</el-radio>
          </el-radio-group>
          <el-descriptions style="margin-top: 20px" class="margin-top" :title="'【'+customerInfo.customerName+'】信息'" :column="2" :size="size" border>
            <el-descriptions-item>
              <template slot="label">
                客户编号
              </template>
              {{customerInfo.customerId}}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                客户名称
              </template>
              {{customerInfo.customerName}}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                地区
              </template>
              {{customerInfo.customerRegion}}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                客户经理
              </template>
              {{customerInfo.staffName}}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
              </template>
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
              </template>
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                客户等级
              </template>
              {{customerInfo.customerGradeEntry}}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                客户满意度
              </template>
              {{customerInfo.customerSatisfactionEntry}}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                客户信用度
              </template>
              {{customerInfo.customerCreditEntry}}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
              </template>
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                地址
              </template>
              {{customerInfo.customerAddress}}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                邮政编码
              </template>
              {{ customerInfo.customerPostalCode }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                电话
              </template>
              {{ customerInfo.customerTel }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                邮箱
              </template>
              {{ customerInfo.customerEmail }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                营业执照注册号
              </template>
              {{ customerInfo.customerLicense }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                法人
              </template>
              {{ customerInfo.customerLegalPerson }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                注册资金(万元)
              </template>
              {{ customerInfo.customerRegisteredCapital }}
            </el-descriptions-item>
            <el-descriptions-item>
            <template slot="label">
              年营业额
            </template>
              {{ customerInfo.customerAnnualTurnover }}
          </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                开户银行
              </template>
              {{ customerInfo.customerBank }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                银行账号
              </template>
              {{ customerInfo.customerBankAccount }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                地税登记号
              </template>
              {{ customerInfo.customerLocalTax }}
            </el-descriptions-item>
            <el-descriptions-item>
              <template slot="label">
                国税登记号
              </template>
              {{ customerInfo.customerNationalTax }}
            </el-descriptions-item>
          </el-descriptions>

        </div>
        <div class="text-center" style="margin-top: 40px;padding-bottom: 30px">
          <router-link to="CustomerInfoList" class="btn btn-default">返回</router-link>
        </div>
      </div>
    </article>
  </div>
</template>

<script>
export default {
  name: "CustomerDetailedInfo",
  data(){
    return{
      customerInfo:{},
      size:''
    }
  },
  methods:{
    toCustomerCommunicationRecordList(){
      this.$router.push({path:'/MemuBar/CustomerCommunicationRecordList',query:{customerId:this.customerInfo.customerId,customerName:this.customerInfo.customerName}})
    },
    toCustomerContactsList(){
      this.$router.push({path:'/MemuBar/CustomerContactsList',query:{customerId:this.customerInfo.customerId,customerName:this.customerInfo.customerName}})
    },
    toCustomerOrderList(){
      this.$router.push({path:'/MemuBar/CustomerOrderList',query:{customerId:this.customerInfo.customerId,customerName:this.customerInfo.customerName}})
    },
    loadCustomer(){
      this.$axios.get('/customer/loadCustomerByCustomerId',{
        params:{
          customerId:this.$route.query.customerId
        }
      }).then(
        res=>{
          this.customerInfo=res.data.data
        }
      )
    }
  },
  created() {
    this.loadCustomer()
  }
}
</script>

<style scoped>
.the_title_style{
  height:55px;
  background-color: #CDCDCD;
  padding: 10px 0px
}
.the_content_style{
  height:55px;
  background-color: #EAEAEA;
  padding: 10px 0px
}
</style>
